ARG MONGO_VERSION
FROM mongo:${MONGO_VERSION}

LABEL maintainer="zyw <1657776088@qq.com>"
RUN mkdir -p /var/log/mongo \
   &&  mkdir -p /usr/local/etc/mongo \
   && touch /var/log/mongo/mongodb.log \
   && chmod -R 777 /var/log/mongo/mongodb.log
COPY ./conf/mongo.conf /usr/local/etc/mongo/mongo.conf

#CMD ["mongod","/usr/local/etc/mongo/mongo.conf"]
CMD ["mongod","-f","/usr/local/etc/mongo/mongo.conf"]
EXPOSE 27017
